{extend name='index/base' /}
{block name='main'}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 信息 <span class="c-gray en">&gt;</span> 信息列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">

    </div>
    <div class="mt-20">
        <div class="dataTables_length mb-15" id="DataTables_Table_0_length">

        </div>
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="100">ID</th>
                <th >信息标题</th>
                <th width="150">接收时间</th>
                <th width="50">是否阅读</th>
                <th width="150">操作</th>
            </tr>
            </thead>
            <tbody>
            {foreach name='message' item="mes"}
            <tr class="text-c">
                <td>{$mes.id}</td>
                <td style="text-align:left;">{$mes.title}</td>
                <td>{$mes.ptime}</td>
                <td>
                    {if condition="$mes.Statue==0"}
                        <span class="label label-success radius">未读</span>
                    {else \ }
                        <span class="label label-error radius">已读</span>
                    {/if}

                </td>
                <td>
                    <a href="/agent/Messages/details?id={$mes.messageID}" onclick="aaa()">
                        查看信息
                    </a>
                </td>
            </tr>
            {/foreach}

            </tbody>
        </table>
{$page}
    </div>
</div>

</body>
</html>

{/block}


{block name='my'}
<script>

</script>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<!--<script type="text/javascript" src="/static/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>-->
<script type="text/javascript" src="/static/admin/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
    $(function(){
//        $('.table-sort').dataTable({
//            "aaSorting": [[ 1, "desc" ]],//默认第几个排序
//            "bStateSave": true,//状态保存
//            "aoColumnDefs": [
//                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
//                {"orderable":false,"aTargets":[]}// 制定列不参与排序
//            ]
//        });

    });


    /*用户-添加*/
    function addvip(title,url,w,h){
        layer_show(title,url,w,h);
    }
    /*用户-查看*/
    function member_show(title,url,id,w,h){
        layer_show(title,url,w,h);
    }



    /*用户-编辑*/
    function member_edit(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*密码-修改*/
    function change_password(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*用户-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            $.ajax({
                type: 'POST',
                url: '',
                dataType: 'json',
                success: function(data){
                    $(obj).parents("tr").remove();
                    layer.msg('已删除!',{icon:1,time:1000});
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
    $('#p').change(function () {
        var c=$(this).val();
        $('#pc').val(c);
        $('#myform').submit();

    })

</script>



{/block}